//
//  LuruTextFirldTableViewCell.swift
//  BusinessIOS
//
//  Created by Rain on 2018/12/27.
//  Copyright © 2018 XingJian Li. All rights reserved.
//

import UIKit
import SnapKit
class LuruTextFirldTableViewCell: UITableViewCell {

    var titleLbel:UILabel!
    
    var titleTextField :UITextField!
    
    required init?(coder aDecoder: NSCoder) {
        
        super.init(coder: aDecoder)
        
    }
    
    
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        self.lauoutUI()
        
    }
    func lauoutUI(){
        
        titleLbel = UILabel()

        titleLbel.textAlignment = .left
        titleLbel.font = UIFont.systemFont(ofSize:12)//一般方法
        self.contentView.addSubview(self.titleLbel!)
        
        titleTextField = UITextField()
        //设置边框样式为圆角矩形
        titleTextField.borderStyle = UITextBorderStyle.none
        titleTextField.placeholder = "请输入信息"
        titleTextField.textAlignment = .right
        self.contentView.addSubview(titleTextField)
        
        
  
        self.layoutView()
        
    }
    
    func layoutView() {
        
        self.titleLbel.snp.makeConstraints { (make) in
            make.top.equalTo(self.snp.top).offset(5)
            make.left.equalTo(self.snp.left).offset(10)
            make.width.equalTo(200)
            make.height.equalTo(30)
        }
        
        self.titleTextField.snp.makeConstraints { (make) in
            make.top.equalTo(self.snp.top).offset(5)
            make.left.equalTo(self.titleLbel.snp.right).offset(5)
            make.right.equalTo(self.snp.right).offset(-10)
            make.height.equalTo(30)
        }
        
        
    }
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
